home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / c / cxref-1.001 / cxref-1~ / cxref / cpp / config / sparc / sol2.h next >
Encoding:
C/C++ Source or Header  |  1995-11-15  |  6.1 KB  |  176 lines

  1. /* Definitions of target machine for GNU compiler, for SPARC running Solaris 2
  2.    Copyright 1992 Free Software Foundation, Inc.
  3.  
  4.    Written by Ron Guilmette (rfg@netcom.com).
  5.    Additional changes by David V. Henkel-Wallace (gumby@cygnus.com).
  6.  
  7. This file is part of GNU CC.
  8.  
  9. GNU CC is free software; you can redistribute it and/or modify
  10. it under the terms of the GNU General Public License as published by
  11. the Free Software Foundation; either version 2, or (at your option)
  12. any later version.
  13.  
  14. GNU CC is distributed in the hope that it will be useful,
  15. but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17. GNU General Public License for more details.
  18.  
  19. You should have received a copy of the GNU General Public License
  20. along with GNU CC; see the file COPYING.  If not, write to
  21. the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
  22.  
  23. /* Supposedly the same as vanilla sparc svr4, except for the stuff below: */
  24. #include "sparc/sysv4.h"
  25.  
  26. #undef CPP_PREDEFINES
  27. #define CPP_PREDEFINES \
  28.  "-D__GNUC__=2 -D__GNUC_MINOR__=5 -Dsun -Dsparc -Dunix -D__svr4__ -D__GCC_NEW_VARARGS__ -D__sun__ -D__sparc__ -D__unix__ -D__svr4__ -D__GCC_NEW_VARARGS__ -D__sun -D__sparc -D__unix -D__svr4__ -D__GCC_NEW_VARARGS__ -Asystem(unix) -Asystem(svr4) -Acpu(sparc) -Amachine(sparc)"
  29. /*
  30.  "-Dsun -Dsparc -Dunix -D__svr4__ \
  31.   -Asystem(unix) -Asystem(svr4) -Acpu(sparc) -Amachine(sparc)\
  32.   -D__GCC_NEW_VARARGS__"
  33. */
  34. #undef CPP_SPEC
  35. #define CPP_SPEC "\
  36.    %{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude}\
  37.    %{msparclite:-D__sparclite__} %{mv8:-D__sparc_v8__}\
  38.    %{msupersparc:-D__supersparc__ -D__sparc_v8__}"
  39.  
  40. /* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
  41.    It's safe to pass -s always, even if -g is not used. */
  42. #undef ASM_SPEC
  43. #define ASM_SPEC \
  44.   "%{V} %{v:%{!V:-V}} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \
  45.    %{fpic:-K PIC} %{fPIC:-K PIC}"
  46.  
  47. /* However it appears that Solaris 2.0 uses the same reg numbering as
  48.    the old BSD-style system did. */
  49.  
  50. #undef DBX_REGISTER_NUMBER
  51. /* Same as sparc.h */
  52. #define DBX_REGISTER_NUMBER(REGNO) (REGNO)
  53.  
  54. /* We use stabs-in-elf for debugging, because that is what the native
  55.    toolchain uses.  */
  56. #undef PREFERRED_DEBUGGING_TYPE
  57. #define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
  58.  
  59. /* The Solaris 2 assembler uses .skip, not .zero, so put this back. */
  60. #undef ASM_OUTPUT_SKIP
  61. #define ASM_OUTPUT_SKIP(FILE,SIZE)  \
  62.   fprintf (FILE, "\t.skip %u\n", (SIZE))
  63.  
  64. #undef ASM_OUTPUT_ALIGNED_LOCAL
  65. #define ASM_OUTPUT_ALIGNED_LOCAL(FILE, NAME, SIZE, ALIGN)        \
  66. do {                                    \
  67.   fputs ("\t.local\t", (FILE));        \
  68.   assemble_name ((FILE), (NAME));                    \
  69.   putc ('\n', (FILE));                            \
  70.   ASM_OUTPUT_ALIGNED_COMMON (FILE, NAME, SIZE, ALIGN);            \
  71. } while (0)
  72.  
  73. #undef COMMON_ASM_OP
  74. #define COMMON_ASM_OP "\t.common"
  75.  
  76. /* This is how to output a definition of an internal numbered label where
  77.    PREFIX is the class of label and NUM is the number within the class.  */
  78.  
  79. #undef  ASM_OUTPUT_INTERNAL_LABEL
  80. #define ASM_OUTPUT_INTERNAL_LABEL(FILE,PREFIX,NUM)    \
  81.   fprintf (FILE, ".L%s%d:\n", PREFIX, NUM)
  82.  
  83. /* This is how to output a reference to an internal numbered label where
  84.    PREFIX is the class of label and NUM is the number within the class.  */
  85.  
  86. #undef  ASM_OUTPUT_INTERNAL_LABELREF
  87. #define ASM_OUTPUT_INTERNAL_LABELREF(FILE,PREFIX,NUM)    \
  88.   fprintf (FILE, ".L%s%d", PREFIX, NUM)
  89.  
  90. /* This is how to store into the string LABEL
  91.    the symbol_ref name of an internal numbered label where
  92.    PREFIX is the class of label and NUM is the number within the class.
  93.    This is suitable for output with `assemble_name'.  */
  94.  
  95. #undef  ASM_GENERATE_INTERNAL_LABEL
  96. #define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)    \
  97.   sprintf (LABEL, "*.L%s%d", PREFIX, NUM)
  98.  
  99.  
  100. /* We don't use the standard svr4 STARTFILE_SPEC because it's wrong for us.
  101.    We don't use the standard LIB_SPEC only because we don't yet support c++ */
  102.  
  103. /* If we cannot find the GNU *crt*.o files in the STANDARD_STARTFILE_PREFIX
  104.    directory, our fallback strategy must be to look for these files instead
  105.    in the Sun C 2.0 directory.  */
  106.  
  107. #undef MD_STARTFILE_PREFIX
  108. #define MD_STARTFILE_PREFIX "/opt/SUNWspro/SC2.0/"
  109.  
  110. #undef STARTFILE_SPEC
  111. #define STARTFILE_SPEC "%{!shared: \
  112.              %{!symbolic: \
  113.               %{pg:crt1.o%s}%{!pg:%{p:mcrt1.o%s}%{!p:crt1.o%s}} \
  114.               %{pg:gmon.o%s} \
  115.               %{pg:crti.o%s}%{!pg:crti.o%s} \
  116.               %{ansi:/usr/ccs/lib/values-Xc.o%s} \
  117.               %{!ansi: \
  118.                %{traditional:/usr/ccs/lib/values-Xt.o%s} \
  119.                %{!traditional:/usr/ccs/lib/values-Xa.o%s}}}} \
  120.               crtbegin.o%s"
  121.  
  122. /* ??? Note: in order for -compat-bsd to work fully,
  123.    we must somehow arrange to fixincludes /usr/ucbinclude
  124.    and put the result in $(libsubdir)/ucbinclude.  */
  125.  
  126. #undef LIB_SPEC
  127. #define LIB_SPEC \
  128.   "%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} \
  129.    %{!shared:%{!symbolic:-lc}} \
  130.    crtend.o%s \
  131.    %{!shared:%{!symbolic:%{pg:crtn.o%s}%{!pg:crtn.o%s}}}"
  132.  
  133. /* This should be the same as in svr4.h, except with -R added.  */
  134. #undef LINK_SPEC
  135. #define LINK_SPEC \
  136.   "%{h*} %{V} %{v:%{!V:-V}} \
  137.    %{b} %{Wl,*:%*} \
  138.    %{static:-dn -Bstatic} \
  139.    %{shared:-G -dy} \
  140.    %{symbolic:-Bsymbolic -G -dy} \
  141.    %{G:-G} \
  142.    %{YP,*} \
  143.    %{R*} \
  144.    %{compat-bsd: \
  145.      %{!YP,*:%{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
  146.        %{!p:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}} \
  147.      -R /usr/ucblib} \
  148.    %{!compat-bsd: \
  149.      %{!YP,*:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
  150.        %{!p:-Y P,/usr/ccs/lib:/usr/lib}}} \
  151.    %{Qy:} %{!Qn:-Qy}"
  152.  
  153. /* This defines which switch letters take arguments.
  154.    It is as in svr4.h but with -R added.  */
  155.  
  156. #undef SWITCH_TAKES_ARG
  157. #define SWITCH_TAKES_ARG(CHAR) \
  158.   (   (CHAR) == 'D' \
  159.    || (CHAR) == 'U' \
  160.    || (CHAR) == 'o' \
  161.    || (CHAR) == 'e' \
  162.    || (CHAR) == 'u' \
  163.    || (CHAR) == 'I' \
  164.    || (CHAR) == 'm' \
  165.    || (CHAR) == 'L' \
  166.    || (CHAR) == 'R' \
  167.    || (CHAR) == 'A' \
  168.    || (CHAR) == 'h' \
  169.    || (CHAR) == 'z')
  170.  
  171. /* ??? This does not work in SunOS 4.x, so it is not enabled in sparc.h.
  172.    Instead, it is enabled here, because it does work under Solaris.  */
  173. /* Define for support of TFmode long double and REAL_ARITHMETIC.
  174.    Sparc ABI says that long double is 4 words.  */
  175. #define LONG_DOUBLE_TYPE_SIZE 128
  176.